<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>入口</title>
</head>

<body>

</body>

</html>
<script>
  function isMobile() {
    var userAgenInfo = navigator.userAgent
    console.log("=====================================");
    console.log(userAgenInfo);
    console.log(userAgenInfo);
    console.log(userAgenInfo);
    var Agents = new Array('Android', 'iPhone', 'SymbianOS', 'iPad', 'iPod')
    var flag = false
    for (var v = 0; v < Agents.length; v++) {
      if (userAgenInfo.indexOf(Agents[v]) > 0) {
        flag = true
        break
      }
    }
    return flag
  }
  if (isMobile()) {
    console.log("--------------------------------")
    console.log(navigator.userAgent)
    console.log("--------------------------------")
    window.location.href = '/mobile.html#/'
  } else {
    window.location.href = '/pc.html#/'
  }

  // //页面进入时获取相关参数，防止直接进入首页
  // var URL_hash = window.location.hash
  // if (isMobile()) {
  //   window.location.href = '/m.html'+ URL_hash
  // } else {
  //   window.location.href = '/c.html'+ URL_hash
  // }
</script>
